package com.zm.demo.shoppingmall.gateway.service;

import com.zm.demo.shoppingmall.user.api.UserService;
import com.zm.demo.shoppingmall.user.model.TUser;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Component;

/**
 * @desc:
 * @author: z01140
 * @date: 2021/5/24 16:44
 */
@Component
public class UserManager {

    @DubboReference
    private UserService userService;

    public int addUser(TUser user){
        return userService.addUser(user);
    }

    public TUser getUserByMobilePhone(String mobilePhone){
        return userService.getUserByMobilePhone(mobilePhone);
    }

    public TUser getUserById(Integer userId){
        return userService.getUserById(userId);
    }
}
